package com.niit.service.impl;

import com.niit.dao.WindowMapper;
import com.niit.pojo.Window;
import com.niit.service.WindowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Service
public class WindowServiceImpl implements WindowService {
    @Autowired
    private WindowMapper windowMapper;

    @Override
    public List<Window> getAllWindows() {
        return windowMapper.getAllWindows();
    }
    @Override
    public void addWindow(Window window) {
        windowMapper.addWindow(window);
    }
    @Override
    public void editWindow(Window window) {

        windowMapper.editWindow(window);
    }

    @Override
    public void deleteWindow(String windowId) {
        windowMapper.deleteWindow(windowId);
    }
    @Override

    public void updateWindow(Window window) {
        windowMapper.updateWindow(window);
    }


    @Override
    public Window getWindowById(String windowId) {
        return windowMapper.getWindowById(windowId);
    }
}
